package com.itheima.mall.service.umsService;

import com.itheima.mall.mapper.umsMapper.UmsResourceMapper;
import com.itheima.pojo.ums.UmsResource;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.ArrayList;
import java.util.List;

@DubboService
public class UmsResourceApiImpl implements UmsResourceApi{

    @Autowired
    private UmsResourceMapper umsResourceMapper;

    /**
     * 根据关联资源IDS数组查询资源数组
     * @param resourceIds 资源IDS数组
     * @return
     */
    @Override
    public ArrayList<UmsResource> listResource(ArrayList<Long> resourceIds) {
        List<UmsResource> umsResources = umsResourceMapper.selectBatchIds(resourceIds);
        return new ArrayList<UmsResource>(umsResources);
    }
}
